//
//  WebViewController.m
//  不得姐
//
//  Created by 许小军 on 16/9/27.
//  Copyright © 2016年 wyzc. All rights reserved.
//

#import "WebViewController.h"
#import <WebKit/WebKit.h>
@interface WebViewController ()
@property (weak, nonatomic) IBOutlet UIView *containtView;
@property(strong,nonatomic)WKWebView * webview;
@end

@implementation WebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    WKWebView * webView=[[WKWebView alloc]init];
    _webview=webView;
    [self.containtView addSubview: webView];
    
    NSURLRequest * request=[NSURLRequest requestWithURL:_url];
    [webView loadRequest:request];
    
}

//设置子视图的位置,注意设置
-(void)viewDidLayoutSubviews
{
    [super viewDidLayoutSubviews];
    _webview.frame=self.view.bounds;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
